﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CDB.LinqModel.Data;
using CDB.LinqData;
using CDB.LinqModel;

public partial class Activation : System.Web.UI.Page
{

    #region Variable Declaration
    IDataRepository _dataObject = new DataRepository();
    User user;
    #endregion

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["Id"] != null)
        {
            ActivateProfile(Request.QueryString["Id"].ToString());
        }
    }
    private void ActivateProfile(string Id)
    {
        user = new User(_dataObject);
        user.UniqueId = new Guid(Id);
        user.GetUserByUniqueId();

        if (user.Id != 0)
        {
            user.ActivateUser();
        }
    }
}